import {getCartList} from '@/Api/cart'
let getCartListAction = ()=>{
     return (dispatch)=>{
        getCartList().then(res=>{
            dispatch({
                type:"SET_CARTLIST",
                list:res.data.data.list
            })
        })
     }
}

let changeCartGoodsNum = (index,cartNum)=>{
     return {
        type:"SET_GOODS_NUM",
        index:index,
        cartNum:cartNum
     }
}

export {
    getCartListAction,
    changeCartGoodsNum
}